package cn.iotab.iotkit.transport.api.common.message.msg.up;

import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

@Getter
@Setter
public class SessionInfo implements Serializable {

    private String sessionId;
    private String productKey;
    private String deviceId;

    @Override
    public String toString() {
        return sessionId + "[" + productKey + ":" + deviceId + "]";
    }

    public static SessionInfo of(String sessionId, String productKey, String deviceId) {
        SessionInfo sessionInfo = new SessionInfo();
        sessionInfo.sessionId = sessionId;
        sessionInfo.productKey = productKey;
        sessionInfo.deviceId = deviceId;
        return sessionInfo;
    }
}